﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterSGA.Master" AutoEventWireup="true" CodeBehind="EditRegister.aspx.cs" Inherits="SGA.Authentication.User.EditRegister" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="leftcolumnwrap">
        <div id="leftcolumn">
            <p>
                <asp:Button ID="UpdateButton" runat="server" Text="Atualizar" ValidationGroup="InsertItem" OnClick="UpdateButton_Click" CssClass="buttonContext" /></p>
        </div>
    </div>
    <div class="contentFloat">
        <div>
            <br />
            <asp:Label runat="server" Text="Nome:" CssClass="LabelAddItem"></asp:Label>
            <asp:TextBox ID="NameTextBox" runat="server" Columns="40" />
            <asp:RequiredFieldValidator ID="RequiredFieldName" runat="server" ErrorMessage="Nome é obrigatório" CssClass="Alert" Display="Dynamic" ControlToValidate="NameTextBox" SetFocusOnError="True" ValidationGroup="InsertItem"></asp:RequiredFieldValidator>
            <br />
            <asp:Label runat="server" Text="Username:" CssClass="LabelAddItem"></asp:Label>
            <asp:TextBox ID="UsernameTextBox" Enabled="false" runat="server" />
            <asp:RequiredFieldValidator ID="RequiredFieldUsername" runat="server" ErrorMessage="Username é obrigatório" CssClass="Alert" Display="Dynamic" ControlToValidate="UsernameTextBox" SetFocusOnError="True" ValidationGroup="InsertItem"></asp:RequiredFieldValidator>
            <br />
            <asp:Label runat="server" Text="Alias:" CssClass="LabelAddItem"></asp:Label>
            <asp:TextBox ID="AliasTextBox" runat="server" MaxLength="7" Columns="5" />
            <asp:RequiredFieldValidator ID="RequiredFieldAlias" runat="server" ErrorMessage="Alias é obrigatório" CssClass="Alert" Display="Dynamic" ControlToValidate="AliasTextBox" SetFocusOnError="True" ValidationGroup="InsertItem"></asp:RequiredFieldValidator>
            <br />
            <asp:Label runat="server" Text="Password:" CssClass="LabelAddItem"></asp:Label>
            <asp:TextBox ID="PasswordTextBox" runat="server" TextMode="Password" />
            <asp:RequiredFieldValidator ID="RequiredFieldPassword" runat="server" ErrorMessage="Password é obrigatório" CssClass="Alert" Display="Dynamic" ControlToValidate="PasswordTextBox" SetFocusOnError="True" ValidationGroup="InsertItem"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionPassword" runat="server" ErrorMessage="Password tem de ter o mínumo de 7 carateres" ValidationGroup="InsertItem" SetFocusOnError="True" ControlToValidate="PasswordTextBox" CssClass="Alert" Display="Dynamic" ValidationExpression="^.{6,30}$"></asp:RegularExpressionValidator>
            <br />
            <asp:Label runat="server" Text="Enable:" CssClass="LabelAddItem"></asp:Label>
            <asp:CheckBox ID="EnableCheckBox" runat="server" />
            <br />
            <asp:Label ID="LabelRole" runat="server" Text="Nível de acesso:" CssClass="LabelAddItem"></asp:Label>
            <asp:DropDownList ID="DropDownListRole" runat="server" ValidationGroup="InsertItem" DataSourceID="ODSRoles" Enabled="False"></asp:DropDownList>
            <br />
        </div>
        <asp:HiddenField ID="IdUserTextBox" runat="server" Visible="False"></asp:HiddenField>
        <asp:ObjectDataSource ID="ODSRoles" runat="server" SelectMethod="GetAllRoles" TypeName="System.Web.Security.Roles"></asp:ObjectDataSource>
        <br />
        <div id="divStatus">
            <asp:Label ID="NotificationLabel" runat="server"></asp:Label>
        </div>
    </div>
</asp:Content>
